package com.zx.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author ZX
 * @date 2021/3/21
 */
@RestController
@RequestMapping(value = "/consumer")
@Slf4j
public class OrderController
{
    @Resource
    private RestTemplate restTemplate;

    private  final  String  PAYMENT_URL="CLOUD-PAYMENT";


    private  int count =0;
    @RequestMapping(value = "/consul")
    public String paymentInfo(){

        return   restTemplate.getForObject(PAYMENT_URL+"/payment/consul",String.class);

    }
}
